/*
 * @Author: gonghairun
 * @Date: 2021-03-05 13:37:29
 * @LastEditors: gonghairun
 * @LastEditTime: 2022-05-28 17:20:51
 * @Description: //描述
 */
const order = {
	state: {
		prefixCodeList: [], //前缀名
		suffixCodeList: [], //后缀名
		isaddDestDes: false, //是否新增目标票货
		isaddOrderDes: false, //是否新增子票货
		ischoosedes: false, //是否选择子票货
		subTicketBargeList: [], //获取子票货驳船接口
		shipId: "", //卸货海轮id
		shipName: "", //卸货海轮名称
		cargoInfoCode: "", //货名
		loadBargeList: [], //驳船列表（装）
		unloadBargeList: [], //	驳船列表（卸）
		loadShipList: [], //海轮列表（装）
		unloadShip: [], //	海轮列表（卸）
		loadTruckList: [], //汽车列表（装）
		unloadTruckList: [], //汽车列表（卸）
		loadTrainList: [], //火车列表（装）
		unloadTrainList: [], //火车列表（卸）
		ticketAddList: [], //子票货列表
		targetTicketAddList: [], //目标票货列表
		processList: [], //操作过程
		ticketId: "", //主票货id
		isShowTicket: false, //是否显示子票货
		isNew: "", //是否新增主票货
		isMerge: false, //是否集并发
		processCode: "",
		isShowModel: true,
		isShowModel1: true,
		fontIdList: [],
		num: "",
		weight: "",
		ticketInfo: {},
	},
	mutations: {
		SET_TICKETINFO(state, data) {
			state.ticketInfo = data
		},
		SET_PROCESSCODE(state, data) {
			state.processCode = data
		},
		// set前缀名数组
		SET_PRECODE(state, data) {
			state.prefixCodeList = data
		},
		SET_IDLIST(state, data) {
			state.fontIdList = data
		},
		//set后缀名数组
		SET_SUFCODE(state, data) {
			state.suffixCodeList = data
		},
		//set是否新增子票货
		SET_ISADDORDERDES(state, data) {
			state.isaddOrderDes = data
		},
		//set是否新增目标票货
		SET_ISADDDESTDES(state, data) {
			state.isaddDestDes = data
		},
		//set子票货驳船接口
		SET_BARGELIST(state, data) {
			state.subTicketBargeList = data
		},
		//set子票货shipid
		SET_SHIPID(state, data) {
			state.shipId = data
		},
		//set子票货shipName
		SET_SHIPNAME(state, data) {
			state.shipName = data
		},
		//set货名code
		SET_CARGOINFOCODE(state, data) {
			state.cargoInfoCode = data
		},
		//set操作过程
		SET_PROCESS(state, data) {
			state.processList = data
		},
		// set驳船列表（装）
		SET_LOADBARGE(state, data) {
			state.loadBargeList = data
		},
		// set驳船列表（卸）
		SET_UNLOADBARGE(state, data) {
			state.unloadBargeList = data
		},
		// set海轮列表（装）
		SET_LOADSHIP(state, data) {
			state.loadShipList = data
		},
		// set海轮列表（卸）
		SET_UNLOADSHIP(state, data) {
			state.unloadShip = data
		},
		// set汽车列表（装）
		SET_LOADTRUCK(state, data) {
			state.loadTruckList = data
		},
		// set汽车列表（卸）
		SET_UNLOADTRUCK(state, data) {
			state.unloadTruckList = data
		},
		// set火车列表（装）
		SET_LOADTRAIN(state, data) {
			state.loadTrainList = data
		},
		// set驳船列表（卸）
		SET_UNLOADTRAIN(state, data) {
			state.unloadTrainList = data
		},
		// set子票货列表
		SET_TICKETLIST(state, data) {
			state.ticketAddList = data
		},
		// set目标票货列表
		SET_TARGETTICKETLIST(state, data) {
			state.targetTicketAddList = data
		},
		// set主票货id
		SET_TICKETID(state, data) {
			state.ticketId = data
		},
		// set子票货是否显示
		SET_SHOWTICKET(state, data) {
			state.isShowTicket = data
		},
		// set是否选择子票货
		SET_CHOOSE(state, data) {
			state.ischoosedes = data
		},
		// set是否新增主票货
		SET_ISNEW(state, data) {
			state.isNew = data
		},
		// set是否新增主票货
		SET_ISMERGE(state, data) {
			state.isMerge = data
		},
		// 放大/缩小
		SET_ISSHOWMODEL(state, data) {
			state.isShowModel = data
		},
		// 放大/缩小
		SET_ISSHOWMODEL1(state, data) {
			state.isShowModel1 = data
		},
		SET_NUM(state, data) {
			state.num = data
		},
		SET_WEIGHT(state, data) {
			state.weight = data
		},
		// 清空store数据
		SET_ROLOAD(state) {
			state.prefixCodeList = [] //前缀名
			state.suffixCodeList = [] //后缀名
			state.isaddDestDes = false //是否新增子票货
			state.isaddOrderDes = false //是否新增目标票货
			state.ischoosedes = false //是否选择子票货
			state.subTicketBargeList = [] //获取子票货驳船接口
			state.shipId = "" //卸货海轮id
			state.cargoInfoCode = "" //卸货海轮名称
			state.loadBargeList = [] //驳船列表（装）
			state.unloadBargeList = [] //驳船列表（卸）
			state.loadShipList = [] //海轮列表（装）
			state.unloadShip = [] //海轮列表（卸）
			state.loadTruckList = [] //汽车列表（装）
			state.unloadTruckList = [] //汽车列表（卸）
			state.loadTrainList = [] //火车列表（装）
			state.unloadTrainList = [] //火车列表（卸）
			state.ticketAddList = [] //子票货列表
			state.targetTicketAddList = [] //目标票货列表
			state.processList = [] //操作过程
			state.ticketId = "" //主票货id
			state.isShowTicket = false //是否显示子票货
			state.isNew = "" //是否新增主票货
			state.isShowModel = true
			state.isShowModel1 = true
			state.num = ""
			state.weight = ""
			state.ticketInfo = {}
		},
	},
}

export default order
